package com.qf.day02;

import java.util.Scanner;

public class ShoppingDemo {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入购物金额");
        double price = sc.nextDouble();
        System.out.println("请输入您的积分");
        double score = sc.nextDouble();
        if (score > 0) {
            if (score < 2000) {
                double count = 0.9;
                System.out.println("该商品应付：" + price * count + "元");
                System.out.println("打9折");
            } else if (score < 4000) {
                double count = 0.8;
                System.out.println("该商品应付：" + price * count + "元");
                System.out.println("打8折");
            } else if (score < 8000) {
                double count = 0.7;
                System.out.println("该商品应付：" + price * count + "元");
                System.out.println("打7折");
            } else {
                double count = 0.6;
                System.out.println("打6折");
                System.out.println("该商品应付：" + price * count + "元");
            }
        } else {
            System.out.println("输入有误");
        }
    }
}
